# message = input('输入文本')
# print(message)

# age = input('请输入你的年龄')
# age = int(age)
# if age >= 18:
#     print('已满18岁')
# else:
#     print('未满18岁')
#
# print(4 % 3)

# current_number = 1
# while current_number <= 10:
#     print(current_number)
#     current_number += 1
# message = ""
# while message != "quit":
#     message = input("输入quit退出")
#     if message != 'quit':
#         print(message)
# 练习
# 1、有家电影院根据观众的年龄收取不同的票价：不到3岁的观
# 众免费；3～12岁的观众收费10美元；超过12岁的观众收费15美元。请编写一个
# 循环，在其中询问用户的年龄，并指出其票价

# active = True
# while active:
#     input_value = input('请输入年龄,输入quit退出')
#     if input_value == 'quit':
#         active = False
#         print('程序已退出')
#     else:
#         age = int(input_value)
#         if age < 3:
#             price = 0
#         elif age <= 12:
#             price = 10
#         else:
#             price = 15
#         print(f"票价是:${price}")

unconfirmed_users = ['张三', '李四', '王五']
confirmed_users = []
while unconfirmed_users:
    current_user = unconfirmed_users.pop(0)
    print(f"正在验证用户 {current_user}")
    confirmed_users.append(current_user)
print('以下用户已被验证')
for user in confirmed_users:
    print(user)

pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat']
# 只移除第一个满足条件的元素
pets.remove('cat')
print(pets)
while 'cat' in pets:
    pets.remove('cat')
print(pets)

responses = {}
active = True
while active:
    name = input("请输入名字")
    response = input("请输入爱好")
    responses[name] = response
    if input("是否还要录入？(y/n)").lower() == 'n':
        active = False
print(responses)
